﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using NetMQ.Sockets;
using NetMQ;
using AsyncIO;

namespace _0MQServer
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var xpubSocket = new XPublisherSocket("tcp://127.0.0.1:1234"))
            using (var xsubSocket = new XSubscriberSocket("tcp://127.0.0.1:5678"))
            {
                var proxy = new Proxy(xsubSocket, xpubSocket);
                Task.Factory.StartNew(proxy.Start);
                Console.WriteLine("服务端启动完成。");
                Console.ReadKey();
            }
        }
    }
}
